home *** CD-ROM | disk | FTP | other *** search
/ 3D World 115 / 3DW_115.iso / DiscContent / Tutorial Files / Compositing Tips / data / Scene files / HSV_Keyer.nk < prev    next >
Text File  |  2009-01-29  |  3KB  |  166 lines

  1. set cut_paste_input [stack 0]
  2. version 4.8200
  3. push $cut_paste_input
  4. Group {
  5.  inputs 1
  6.  name HSV_Keyer
  7.  tile_color 0xff0000
  8.  note_font 1
  9.  note_font_size 16
  10.  selected true
  11.  xpos 7
  12.  ypos 93
  13.  help "A keyer built to utilize HSV information and generate your matte accordingly. Node courtesy of Matthew Doll. www.matthewdoll.com mattdoll@gmail.com"
  14.  addUserKnob {20 ksvKey l "HSV Keyer"}
  15.  addUserKnob {18 Color R -1 1}
  16.  Color {0 0 0}
  17.  addUserKnob {6 invResult l "Invert Result?"}
  18.  addUserKnob {26 "" l ""}
  19.  addUserKnob {7 hueRange l "Hue Range:"}
  20.  addUserKnob {7 hueSharp l "Hue Sharpness:"}
  21.  addUserKnob {7 hueFalloff l "Hue Falloff:" R -1 1}
  22.  addUserKnob {26 "" l ""}
  23.  addUserKnob {7 satRange l "Saturation Range:"}
  24.  addUserKnob {7 satSharp l "Saturation Sharpness:"}
  25.  addUserKnob {7 satFalloff l "Saturation Falloff:" R -1 1}
  26.  addUserKnob {26 "" l ""}
  27.  addUserKnob {7 valRange l "Value Range:"}
  28.  addUserKnob {7 valSharp l "Value Sharpness:"}
  29.  addUserKnob {7 valFalloff l "Value Falloff:" R -1 1}
  30.  addUserKnob {26 "" l ""}
  31.  addUserKnob {32 resetKeyer l "Reset Values" T "knob hueRange 0;\nknob hueSharp 0;\nknob hueFalloff 0;\nknob satRange 0;\nknob satSharp 0;\nknob satFalloff 0;\nknob valRange 0;\nknob valSharp 0;\nknob valFalloff 0;"}
  32. }
  33.  Input {
  34.   inputs 0
  35.   name in
  36.   xpos -358
  37.   ypos -282
  38.  }
  39.  Dot {
  40.   name Dot5
  41.   xpos -324
  42.   ypos -207
  43.  }
  44. set N7d30870 [stack 0]
  45.  Grade {
  46.   multiply 0.1
  47.   name Grade2
  48.   xpos -358
  49.   ypos -142
  50.  }
  51.  Colorspace {
  52.   illuminant_in A
  53.   colorspace_out HSV
  54.   illuminant_out 9300
  55.   name Colorspace2
  56.   xpos -358
  57.   ypos -75
  58.  }
  59. push $N7d30870
  60.  Remove {
  61.   operation keep
  62.   channels rgba
  63.   name Remove2
  64.   xpos -536
  65.   ypos -154
  66.  }
  67.  Clamp {
  68.   maximum 0
  69.   name Clamp1
  70.   xpos -536
  71.   ypos -128
  72.  }
  73.  Grade {
  74.   add {{parent.Color.r} {parent.Color.g} {parent.Color.b} 0}
  75.   name Grade4
  76.   xpos -536
  77.   ypos -88
  78.  }
  79.  Grade {
  80.   multiply 0.1
  81.   name Grade3
  82.   xpos -536
  83.   ypos -43
  84.  }
  85.  Colorspace {
  86.   illuminant_in A
  87.   colorspace_out HSV
  88.   illuminant_out 9300
  89.   name Colorspace1
  90.   xpos -536
  91.   ypos 4
  92.  }
  93.  Merge2 {
  94.   inputs 2
  95.   operation minus
  96.   name Merge1
  97.   xpos -358
  98.   ypos 4
  99.  }
  100.  Expression {
  101.   expr0 abs(r)
  102.   expr1 abs(g)
  103.   expr2 abs(b)
  104.   name Expression1
  105.   xpos -358
  106.   ypos 140
  107.  }
  108.  Invert {
  109.   name Invert1
  110.   xpos -358
  111.   ypos 248
  112.  }
  113.  Dot {
  114.   name Dot1
  115.   xpos -324
  116.   ypos 378
  117.  }
  118.  Grade {
  119.   blackpoint {{"parent.hueSharp * (1 - parent.hueRange)"} {"parent.satSharp * (1 - parent.satRange)"} {"parent.valSharp * (1 - parent.valRange)"} 0}
  120.   whitepoint {{"1 - parent.hueRange"} {"1- parent.satRange"} {"1- parent.valRange"} 1}
  121.   gamma {{"-parent.hueFalloff + 1"} {"-parent.satFalloff + 1"} {"-parent.valFalloff + 1"} 1}
  122.   name Grade1
  123.   xpos -358
  124.   ypos 479
  125.  }
  126.  Expression {
  127.   expr3 r*g*b
  128.   name Expression2
  129.   xpos -358
  130.   ypos 506
  131.  }
  132. add_layer {alpha rgba.alpha}
  133.  Remove {
  134.   operation keep
  135.   channels alpha
  136.   name Remove1
  137.   xpos -358
  138.   ypos 752
  139.  }
  140.  Clamp {
  141.   name Clamp3
  142.   xpos -358
  143.   ypos 809
  144.  }
  145.  Invert {
  146.   name Invert2
  147.   xpos -358
  148.   ypos 849
  149.   disable {{parent.invResult}}
  150.  }
  151.  Output {
  152.   name Output1
  153.   xpos -358
  154.   ypos 918
  155.  }
  156.  StickyNote {
  157.   inputs 0
  158.   name StickyNote1
  159.   label "Node courtesy of mattdoll@gmail.com"
  160.   note_font 1
  161.   note_font_size 25
  162.   xpos -189
  163.   ypos 744
  164.  }
  165. end_group
  166.